package com.app.bimo.module_accounts.mvp.constract;




import com.app.bimo.commonbusiness.bean.BaseResult;
import com.app.bimo.commonbusiness.mvp.IModel;
import com.app.bimo.commonbusiness.mvp.IView;
import com.app.bimo.library_db.UserData;
import com.app.bimo.module_accounts.mvp.model.entiy.OtherResult;

import androidx.collection.ArrayMap;
import io.reactivex.Observable;

public class PhoneLoginContract {
    //对于经常使用的关于UI的方法可以定义到IView中,如显示隐藏进度条,和显示文字消息
    public interface View extends IView {
        void getCodeDataNotify(Object data);

        void registerDataNotify(OtherResult data);

        void getCodeError(String s);

        void showDialogLoading();

        void hideDialogLoading();
        void userInfoNotify(UserData data);

    }

    //Model层定义接口,外部只需关心Model返回的数据,无需关心内部细节,如是否使用缓存
    public interface Model extends IModel {
        Observable<BaseResult<Object>> getCode(String mobile, int type);

    Observable<BaseResult<OtherResult>> phoneRegister(ArrayMap<String, String> map);
    Observable<BaseResult<UserData>> getUserInfo();
}
}
